#include <iostream>
#include "Observer.cpp"
#define MAX_OBSERVERS 20
class Subject{      //职责： 1.拥有观察者的列表。2.发送通知
    public:
        void addObserver(Observer* observer){
            //Add to array...
        }
        void removeObserver(Observer* observer){
            //Remove from array...
        }

    private:
        Observer* observers_[MAX_OBSERVERS];
        int numObservers_;

    protected:
        void notify(const Entity& entity, Event event){
            for(int i = 0; i < numObservers_; i++){
                observers_[i] -> onNotify(entity event);
            }
        }
}   